#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.common.utils;

import org.springframework.core.io.ClassPathResource;

import java.io.IOException;
import java.io.InputStream;

/**
 * Description: SpringBoot jar包运行时，获取内置资源工具类
 *
 * @author wenxiaopeng
 * @date 2021/06/16 18:03
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
public class ResourceUtils {

	/**
	 * Description:
	 * <获取资源流>
	 * @param path classpath
	 * @author wenxiaopeng
	 * @date 18:07 2021/06/16
	 * @return java.io.InputStream
	 **/
	public static InputStream getResourceAsStream(String path) throws IOException {

		ClassPathResource classPathResource = new ClassPathResource(path);
		return classPathResource.getInputStream();
	}

}
